Optimal. Leaf size=226 \[ \frac {16 a (16 A+18 B+21 C) \sin (c+d x)}{315 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {8 a (16 A+18 B+21 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (16 A+18 B+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+9 B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.42, antiderivative size = 226, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {4350, 4171,
4100, 3890, 3889} \begin {gather*} \frac {2 a (16 A+18 B+21 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{105 d \sqrt {a \sec (c+d x)+a}}+\frac {8 a (16 A+18 B+21 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{315 d \sqrt {a \sec (c+d x)+a}}+\frac {16 a (16 A+18 B+21 C) \sin (c+d x)}{315 d \sqrt {\cos (c+d x)} \sqrt {a \sec (c+d x)+a}}+\frac {2 a (A+9 B) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}}+\frac {2 A \sin (c+d x) \cos ^{\frac {7}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3889
Rule 3890
Rule 4100
Rule 4171
Rule 4350
Rubi steps
\begin {align*} \int \cos ^{\frac {9}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 A \cos ^{\frac {7}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{9 d}+\frac {\left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)} \left (\frac {1}{2} a (A+9 B)+\frac {3}{2} a (2 A+3 C) \sec (c+d x)\right )}{\sec ^{\frac {7}{2}}(c+d x)} \, dx}{9 a}\\ &=\frac {2 a (A+9 B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{9 d}+\frac {1}{21} \left ((16 A+18 B+21 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)}}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a (16 A+18 B+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+9 B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{9 d}+\frac {1}{105} \left (4 (16 A+18 B+21 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)}}{\sec ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {8 a (16 A+18 B+21 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (16 A+18 B+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+9 B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{9 d}+\frac {1}{315} \left (8 (16 A+18 B+21 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {16 a (16 A+18 B+21 C) \sin (c+d x)}{315 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {8 a (16 A+18 B+21 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (16 A+18 B+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+9 B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.61, size = 127, normalized size = 0.56 \begin {gather*} \frac {\sqrt {\cos (c+d x)} (1321 A+1368 B+1596 C+(752 A+846 B+672 C) \cos (c+d x)+4 (83 A+54 B+63 C) \cos (2 (c+d x))+80 A \cos (3 (c+d x))+90 B \cos (3 (c+d x))+35 A \cos (4 (c+d x))) \sqrt {a (1+\sec (c+d x))} \sin (c+d x)}{1260 d (1+\cos (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.50, size = 153, normalized size = 0.68
method | result | size |
default | \(-\frac {2 \left (-1+\cos \left (d x +c \right )\right ) \left (35 A \left (\cos ^{4}\left (d x +c \right )\right )+40 A \left (\cos ^{3}\left (d x +c \right )\right )+45 B \left (\cos ^{3}\left (d x +c \right )\right )+48 A \left (\cos ^{2}\left (d x +c \right )\right )+54 B \left (\cos ^{2}\left (d x +c \right )\right )+63 C \left (\cos ^{2}\left (d x +c \right )\right )+64 A \cos \left (d x +c \right )+72 B \cos \left (d x +c \right )+84 C \cos \left (d x +c \right )+128 A +144 B +168 C \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (\sqrt {\cos }\left (d x +c \right )\right )}{315 d \sin \left (d x +c \right )}\) | \(153\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 668 vs.
\(2 (196) = 392\).
time = 0.68, size = 668, normalized size = 2.96 \begin {gather*} \frac {\sqrt {2} {\left (1890 \, \cos \left (\frac {8}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 420 \, \cos \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 252 \, \cos \left (\frac {4}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 45 \, \cos \left (\frac {2}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) - 1890 \, \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {8}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) - 420 \, \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) - 252 \, \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {4}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) - 45 \, \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {2}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 70 \, \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 45 \, \sin \left (\frac {7}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 252 \, \sin \left (\frac {5}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 420 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 1890 \, \sin \left (\frac {1}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right )\right )} A \sqrt {a} - 18 \, \sqrt {2} {\left (7 \, {\left (15 \, \sin \left (3 \, d x + 3 \, c\right ) + 5 \, \sin \left (2 \, d x + 2 \, c\right ) + \sin \left (d x + c\right )\right )} \cos \left (\frac {7}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right ) - {\left (105 \, \cos \left (3 \, d x + 3 \, c\right ) + 35 \, \cos \left (2 \, d x + 2 \, c\right ) + 7 \, \cos \left (d x + c\right ) + 10\right )} \sin \left (\frac {7}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right ) - 7 \, \sin \left (\frac {5}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right ) - 35 \, \sin \left (\frac {3}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right ) - 105 \, \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right )\right )} B \sqrt {a} - 84 \, \sqrt {2} {\left (5 \, {\left (6 \, \sin \left (2 \, d x + 2 \, c\right ) + \sin \left (d x + c\right )\right )} \cos \left (\frac {5}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right ) - {\left (30 \, \cos \left (2 \, d x + 2 \, c\right ) + 5 \, \cos \left (d x + c\right ) + 6\right )} \sin \left (\frac {5}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right ) - 5 \, \sin \left (\frac {3}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right ) - 30 \, \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right )\right )} C \sqrt {a}}{5040 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.31, size = 125, normalized size = 0.55 \begin {gather*} \frac {2 \, {\left (35 \, A \cos \left (d x + c\right )^{4} + 5 \, {\left (8 \, A + 9 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (16 \, A + 18 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (16 \, A + 18 \, B + 21 \, C\right )} \cos \left (d x + c\right ) + 128 \, A + 144 \, B + 168 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\cos \left (c+d\,x\right )}^{9/2}\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________